﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace Group_Project_Book_Store
{
    /// <summary>
    /// Invoice class
    /// </summary>
    class clsInvoice
    {
        /// <summary>
        /// Book has a unique ID in the system
        /// </summary>
        public int invoiceID { get; set; }
        /// <summary>
        /// Date the invoice was dated
        /// </summary>
        public DateTime invoiceDate { get; set; }
        /// <summary>
        /// Payer for the invoice
        /// </summary>
        public clsPayer payer { get; set; }
        /// <summary>
        /// an Invoice has a list of books to be billed
        /// </summary>
        public List<clsBook> listOfBooksInInvoice { get; set; }
        /// <summary>
        /// Date the invoice was entered into the system
        /// </summary>
        public DateTime invoiceDateEnteredTS { get; set; }
        /// <summary>
        /// Method to put information into the invoice object
        /// </summary>
        public clsInvoice() {
            invoiceDate = new DateTime();
            payer = new clsPayer();
            listOfBooksInInvoice = new List<clsBook>();
            invoiceDateEnteredTS = new DateTime();
        }
        public override string ToString()
        {
            try
            {
                return  invoiceID.ToString();
            }
            catch (Exception ex)
            {
                 MessageBox.Show(ex.Message);
                 return null;
            }
        }
    }
}